Change websockets imports to make it compatible with older versions #1120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request resolves the build error issue in bolt-python project with python-slack-sdk v3.11.1: https://github.com/slackapi/bolt-python/actions/runs/1255825291
The error is caused by this change: #1117 More specifically, the following import is only compatible with websockets 9.x (the latest major series) while it's not with v8 or older ones.
This pull request corrects the import to make it compatible with all the websockets versions. For reference, the reason why bolt-python project detected the error is that the project has some tests for Sanic apps and the Sanic framework still requires websockets v8, not v9.
To prevent similar errors in our code, we may want to run tests with older versions of external dependencies. But at this point, I am thinking that it's not so beneficial while the work like that requires a lot of efforts. I'd like to hold off taking such actions for this purpose.
Category (place an
x
in each of the[ ]
)/docs-src
(Documents, have you run./scripts/docs.sh
?)/docs-src-v2
(Documents, have you run./scripts/docs-v2.sh
?)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements (place an
x
in each[ ]
)python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.